<!DOCTYPE html>
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width" />
    <title>Media Chrome Disabled-Controls Video Usage Example</title>
    <script type="module" src="../../dist/index.js"></script>
    <script type="module" src="../../../dist/experimental/index.js"></script>
    <style>
      /** add styles to prevent CLS (Cumulative Layout Shift) */
      media-controller:not([audio]) {
        display: block;         /* expands the container if preload=none */
        max-width: 720px;       /* allows the container to shrink if small */
        aspect-ratio: 16 / 9;   /* set container aspect ratio if preload=none */
      }

      video {
        width: 100%;      /* prevents video to expand beyond its container */
      }

      media-airplay-button[mediaairplayunavailable],
      media-fullscreen-button[mediafullscreenunavailable],
      media-volume-range[mediavolumeunavailable],
      media-pip-button[mediapipunavailable] {
        display: none;
      }

      .examples {
        margin-top: 20px;
      }

      [disabled] {
        opacity: 60%;
        cursor: not-allowed;
      }
    </style>
  </head>
  <body>
    <main>
      <h1>Media Chrome Disabled-Controls Video Usage Example</h1>
      <media-controller>
        <video
          slot="media"
          src="https://stream.mux.com/DS00Spx1CV902MCtPj5WknGlR102V5HFkDe/high.mp4"
          muted
          crossorigin
          playsinline
        >
          <track
            label="thumbnails"
            default
            kind="metadata"
            src="https://image.mux.com/DS00Spx1CV902MCtPj5WknGlR102V5HFkDe/storyboard.vtt"
          />
          <track
            label="English"
            kind="captions"
            srclang="en"
            src="./vtt/en-cc.vtt"
          />
        </video>
        <media-poster-image
          slot="poster"
          src="https://image.mux.com/DS00Spx1CV902MCtPj5WknGlR102V5HFkDe/thumbnail.jpg"
          placeholdersrc=""
        ></media-poster-image>
        <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
        <media-control-bar>
          <media-play-button disabled aria-disabled="true"></media-play-button>
          <media-seek-backward-button seekoffset="15" disabled aria-disabled="true"></media-seek-backward-button>
          <media-seek-forward-button seekoffset="15" disabled aria-disabled="true"></media-seek-forward-button>
          <media-mute-button disabled aria-disabled="true"></media-mute-button>
          <media-volume-range disabled aria-disabled="true"></media-volume-range>
          <media-time-range disabled aria-disabled="true"></media-time-range>
          <media-time-display showduration remaining disabled aria-disabled="true"></media-time-display>
          <media-captions-button default-showing disabled aria-disabled="true"></media-captions-button>
          <media-playback-rate-button disabled aria-disabled="true"></media-playback-rate-button>
          <media-pip-button disabled aria-disabled="true"></media-pip-button>
          <media-fullscreen-button disabled aria-disabled="true"></media-fullscreen-button>
          <media-airplay-button disabled aria-disabled="true"></media-airplay-button>
        </media-control-bar>
      </media-controller>
      <div class="examples">
        <a href="./">View more examples</a>
      </div>
    </main>
  </body>
</html>
